<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>线下组局小程序 - API文档</title>
    <style>
        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            line-height: 1.6;
            margin: 0;
            padding: 20px;
            background-color: #f5f5f5;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            background-color: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        h1 {
            color: #333;
            text-align: center;
            margin-bottom: 30px;
            border-bottom: 3px solid #007bff;
            padding-bottom: 10px;
        }
        h2 {
            color: #007bff;
            margin-top: 30px;
            margin-bottom: 20px;
            border-left: 4px solid #007bff;
            padding-left: 15px;
        }
        .api-section {
            margin-bottom: 40px;
        }
        .api-item {
            background-color: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 15px;
            transition: all 0.3s ease;
        }
        .api-item:hover {
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            transform: translateY(-2px);
        }
        .method {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-weight: bold;
            font-size: 12px;
            margin-right: 10px;
        }
        .get { background-color: #28a745; color: white; }
        .post { background-color: #007bff; color: white; }
        .put { background-color: #ffc107; color: #212529; }
        .delete { background-color: #dc3545; color: white; }
        .endpoint {
            font-family: 'Courier New', monospace;
            background-color: #e9ecef;
            padding: 2px 6px;
            border-radius: 3px;
            font-weight: bold;
        }
        .description {
            margin-top: 8px;
            color: #666;
        }
        .access {
            font-size: 12px;
            color: #6c757d;
            margin-top: 5px;
        }
        .private {
            color: #dc3545;
        }
        .public {
            color: #28a745;
        }
        .stats {
            background-color: #e7f3ff;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
            text-align: center;
        }
        .stats h3 {
            margin: 0;
            color: #007bff;
        }
        .params {
            margin-top: 15px;
            background-color: #f8f9fa;
            padding: 10px;
            border-radius: 5px;
            border-left: 3px solid #007bff;
        }
        .params h4 {
            margin-top: 0;
            color: #007bff;
        }
        .param-item {
            margin-bottom: 8px;
        }
        .param-name {
            font-weight: bold;
            color: #333;
        }
        .param-type {
            color: #6c757d;
            font-style: italic;
            margin-left: 5px;
        }
        .param-required {
            color: #dc3545;
            margin-left: 5px;
        }
        .param-optional {
            color: #28a745;
            margin-left: 5px;
        }
        .response {
            margin-top: 15px;
            background-color: #f8f9fa;
            padding: 10px;
            border-radius: 5px;
            border-left: 3px solid #28a745;
        }
        .response h4 {
            margin-top: 0;
            color: #28a745;
        }
        .code-block {
            background-color: #f1f1f1;
            padding: 10px;
            border-radius: 5px;
            overflow-x: auto;
            font-family: 'Courier New', monospace;
            font-size: 14px;
            margin-top: 10px;
            margin-bottom: 10px;
        }
        .success {
            color: #28a745;
        }
        .error {
            color: #dc3545;
        }
        .example {
            background-color: #e9f7ef;
            padding: 10px;
            border-radius: 5px;
            margin-top: 10px;
        }
        .example h5 {
            margin-top: 0;
            color: #28a745;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>线下组局小程序 - API文档</h1>
        
        <div class="stats">
            <h3>API统计</h3>
            <p>总计 <strong>31个</strong> API端点，涵盖认证、用户管理、活动管理等功能</p>
        </div>

        <div class="api-section">
            <h2>🔐 认证相关API</h2>
            
            <div class="api-item">
                <span class="method post">POST</span>
                <span class="endpoint">/api/auth/wechat-login</span>
                <div class="description">微信小程序登录，通过微信授权码获取用户信息并创建或更新用户账户</div>
                <div class="access public">🌐 公开访问</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">code</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>微信小程序登录凭证</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">userInfo</span>
                        <span class="param-type">object</span>
                        <span class="param-optional">[可选]</span>
                        <div>用户信息对象，包含昵称、头像等</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "登录成功",
  "data": {
    "user": {
      "id": "用户ID",
      "openId": "微信openId",
      "nickname": "用户昵称",
      "avatar": "头像URL",
      "email": "邮箱",
      "phone": "手机号",
      "location": "位置信息",
      "bio": "个人简介",
      "createdAt": "创建时间",
      "updatedAt": "更新时间"
    },
    "token": "JWT令牌",
    "refreshToken": "刷新令牌"
  }
}
                    </div>
                </div>
                
                <div class="example">
                    <h5>请求示例</h5>
                    <div class="code-block">
POST /api/auth/wechat-login
Content-Type: application/json

{
  "code": "微信小程序登录凭证",
  "userInfo": {
    "nickname": "张三",
    "avatar": "https://example.com/avatar.jpg"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method post">POST</span>
                <span class="endpoint">/api/auth/register</span>
                <div class="description">用户注册，创建新的用户账户（替代微信登录的注册方式）</div>
                <div class="access public">🌐 公开访问</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">email</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>用户邮箱，需唯一</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">password</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>用户密码，至少6位</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">nickname</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>用户昵称</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">phone</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>手机号码</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "注册成功",
  "data": {
    "user": {
      "id": "用户ID",
      "email": "邮箱",
      "nickname": "昵称",
      "phone": "手机号",
      "createdAt": "创建时间"
    },
    "token": "JWT令牌",
    "refreshToken": "刷新令牌"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method post">POST</span>
                <span class="endpoint">/api/auth/login</span>
                <div class="description">用户登录，通过邮箱和密码进行身份验证（替代微信登录的登录方式）</div>
                <div class="access public">🌐 公开访问</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">email</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>用户邮箱</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">password</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>用户密码</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "登录成功",
  "data": {
    "user": {
      "id": "用户ID",
      "email": "邮箱",
      "nickname": "昵称",
      "avatar": "头像URL",
      "phone": "手机号",
      "location": "位置信息",
      "bio": "个人简介",
      "createdAt": "创建时间",
      "updatedAt": "更新时间"
    },
    "token": "JWT令牌",
    "refreshToken": "刷新令牌"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method post">POST</span>
                <span class="endpoint">/api/auth/logout</span>
                <div class="description">用户登出，清除用户的JWT令牌</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">无</span>
                        <span class="param-type">-</span>
                        <div>无需参数，使用Authorization头中的JWT令牌</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "登出成功"
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method get">GET</span>
                <span class="endpoint">/api/auth/me</span>
                <div class="description">获取当前用户详细信息，包括粉丝、关注者和好友列表</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">无</span>
                        <span class="param-type">-</span>
                        <div>无需参数，使用Authorization头中的JWT令牌</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "data": {
    "id": "用户ID",
    "openId": "微信openId",
    "unionId": "微信unionId",
    "nickname": "昵称",
    "avatar": "头像URL",
    "email": "邮箱",
    "phone": "手机号",
    "location": "位置信息",
    "bio": "个人简介",
    "followers": [
      {
        "id": "粉丝ID",
        "nickname": "粉丝昵称",
        "avatar": "粉丝头像"
      }
    ],
    "following": [
      {
        "id": "关注ID",
        "nickname": "关注昵称",
        "avatar": "关注头像"
      }
    ],
    "friends": [
      {
        "id": "好友ID",
        "nickname": "好友昵称",
        "avatar": "好友头像"
      }
    ],
    "createdAt": "创建时间",
    "updatedAt": "更新时间"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method put">PUT</span>
                <span class="endpoint">/api/auth/update-profile</span>
                <div class="description">更新用户个人资料，包括昵称、头像、简介、位置等信息</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">nickname</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>用户昵称</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">avatar</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>头像URL</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">bio</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>个人简介</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">location</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>位置信息</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">phone</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>手机号码</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "个人资料更新成功",
  "data": {
    "id": "用户ID",
    "nickname": "更新后的昵称",
    "avatar": "更新后的头像URL",
    "bio": "更新后的个人简介",
    "location": "更新后的位置信息",
    "phone": "更新后的手机号",
    "updatedAt": "更新时间"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method post">POST</span>
                <span class="endpoint">/api/auth/refresh-token</span>
                <div class="description">刷新JWT令牌，延长用户会话时间</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">refreshToken</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>刷新令牌</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "令牌刷新成功",
  "data": {
    "token": "新的JWT令牌",
    "refreshToken": "新的刷新令牌"
  }
}
                    </div>
                </div>
            </div>
        </div>

        <div class="api-section">
            <h2>👥 用户管理API</h2>
            
            <div class="api-item">
                <span class="method get">GET</span>
                <span class="endpoint">/api/users</span>
                <div class="description">获取所有用户列表，支持分页和筛选功能</div>
                <div class="access public">🌐 公开访问</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">page</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>页码，默认为1</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">limit</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>每页数量，默认为10</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">sortBy</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>排序字段，如createdAt, nickname等</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">order</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>排序方向，asc或desc，默认为desc</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "data": {
    "users": [
      {
        "id": "用户ID",
        "nickname": "昵称",
        "avatar": "头像URL",
        "bio": "个人简介",
        "location": "位置信息",
        "followersCount": "粉丝数量",
        "followingCount": "关注数量",
        "friendsCount": "好友数量",
        "createdAt": "创建时间"
      }
    ],
    "pagination": {
      "page": "当前页码",
      "limit": "每页数量",
      "total": "总用户数",
      "pages": "总页数"
    }
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method get">GET</span>
                <span class="endpoint">/api/users/:id</span>
                <div class="description">获取指定用户的详细信息，包括基本资料和统计数据</div>
                <div class="access public">🌐 公开访问</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>用户ID，作为URL路径参数</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "data": {
    "id": "用户ID",
    "nickname": "昵称",
    "avatar": "头像URL",
    "bio": "个人简介",
    "location": "位置信息",
    "followersCount": "粉丝数量",
    "followingCount": "关注数量",
    "friendsCount": "好友数量",
    "activitiesCreated": "创建的活动数量",
    "activitiesParticipated": "参与的活动数量",
    "isFollowing": "当前登录用户是否关注此用户",
    "isFriend": "当前登录用户是否与此用户是好友",
    "createdAt": "创建时间",
    "updatedAt": "更新时间"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method post">POST</span>
                <span class="endpoint">/api/users/:id/follow</span>
                <div class="description">关注指定用户，如果互相关注则自动成为好友</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>要关注的用户ID，作为URL路径参数</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "关注成功",
  "data": {
    "following": true,
    "friend": "如果互相关注则为true，否则为false"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method delete">DELETE</span>
                <span class="endpoint">/api/users/:id/follow</span>
                <div class="description">取消关注指定用户，如果原来是好友关系则解除好友关系</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>要取消关注的用户ID，作为URL路径参数</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "取消关注成功",
  "data": {
    "following": false,
    "friend": false
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method get">GET</span>
                <span class="endpoint">/api/users/:id/followers</span>
                <div class="description">获取指定用户的粉丝列表，支持分页显示</div>
                <div class="access public">🌐 公开访问</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>用户ID，作为URL路径参数</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">page</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>页码，默认为1</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">limit</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>每页数量，默认为10</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "data": {
    "followers": [
      {
        "id": "粉丝ID",
        "nickname": "粉丝昵称",
        "avatar": "粉丝头像",
        "bio": "粉丝简介",
        "isFollowing": "当前登录用户是否关注此粉丝",
        "isFriend": "当前登录用户是否与此粉丝是好友"
      }
    ],
    "pagination": {
      "page": "当前页码",
      "limit": "每页数量",
      "total": "总粉丝数",
      "pages": "总页数"
    }
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method get">GET</span>
                <span class="endpoint">/api/users/:id/following</span>
                <div class="description">获取指定用户关注的人列表，支持分页显示</div>
                <div class="access public">🌐 公开访问</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>用户ID，作为URL路径参数</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">page</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>页码，默认为1</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">limit</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>每页数量，默认为10</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "data": {
    "following": [
      {
        "id": "关注用户ID",
        "nickname": "关注用户昵称",
        "avatar": "关注用户头像",
        "bio": "关注用户简介",
        "isFollowing": "当前登录用户是否关注此用户",
        "isFriend": "当前登录用户是否与此用户是好友"
      }
    ],
    "pagination": {
      "page": "当前页码",
      "limit": "每页数量",
      "total": "总关注数",
      "pages": "总页数"
    }
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method get">GET</span>
                <span class="endpoint">/api/users/:id/friends</span>
                <div class="description">获取指定用户的好友列表，支持分页显示</div>
                <div class="access public">🌐 公开访问</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>用户ID，作为URL路径参数</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">page</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>页码，默认为1</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">limit</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>每页数量，默认为10</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "data": {
    "friends": [
      {
        "id": "好友ID",
        "nickname": "好友昵称",
        "avatar": "好友头像",
        "bio": "好友简介",
        "location": "好友位置",
        "lastActiveAt": "最后活跃时间"
      }
    ],
    "pagination": {
      "page": "当前页码",
      "limit": "每页数量",
      "total": "总好友数",
      "pages": "总页数"
    }
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method get">GET</span>
                <span class="endpoint">/api/users/search</span>
                <div class="description">搜索用户，支持按昵称和简介进行模糊查询</div>
                <div class="access public">🌐 公开访问</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">q</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>搜索关键词</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">page</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>页码，默认为1</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">limit</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>每页数量，默认为10</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "data": {
    "users": [
      {
        "id": "用户ID",
        "nickname": "昵称",
        "avatar": "头像URL",
        "bio": "个人简介",
        "location": "位置信息",
        "followersCount": "粉丝数量",
        "followingCount": "关注数量",
        "isFollowing": "当前登录用户是否关注此用户",
        "isFriend": "当前登录用户是否与此用户是好友"
      }
    ],
    "pagination": {
      "page": "当前页码",
      "limit": "每页数量",
      "total": "搜索结果总数",
      "pages": "总页数"
    }
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method put">PUT</span>
                <span class="endpoint">/api/users/update-location</span>
                <div class="description">更新用户地理位置信息，包括经纬度和详细地址</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">latitude</span>
                        <span class="param-type">number</span>
                        <span class="param-required">[必填]</span>
                        <div>纬度</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">longitude</span>
                        <span class="param-type">number</span>
                        <span class="param-required">[必填]</span>
                        <div>经度</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">address</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>详细地址</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">city</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>城市</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">province</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>省份</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "位置更新成功",
  "data": {
    "location": {
      "latitude": "纬度",
      "longitude": "经度",
      "address": "详细地址",
      "city": "城市",
      "province": "省份",
      "updatedAt": "更新时间"
    }
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method get">GET</span>
                <span class="endpoint">/api/users/nearby</span>
                <div class="description">查找附近活跃用户，基于地理位置和距离筛选</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">latitude</span>
                        <span class="param-type">number</span>
                        <span class="param-required">[必填]</span>
                        <div>当前纬度</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">longitude</span>
                        <span class="param-type">number</span>
                        <span class="param-required">[必填]</span>
                        <div>当前经度</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">radius</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>搜索半径(公里)，默认为10</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">limit</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>返回数量限制，默认为20</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "data": {
    "users": [
      {
        "id": "用户ID",
        "nickname": "昵称",
        "avatar": "头像URL",
        "bio": "个人简介",
        "location": "位置信息",
        "distance": "距离(公里)",
        "isFollowing": "当前登录用户是否关注此用户",
        "isFriend": "当前登录用户是否与此用户是好友",
        "lastActiveAt": "最后活跃时间"
      }
    ],
    "count": "附近用户总数"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method get">GET</span>
                <span class="endpoint">/api/users/recommendations</span>
                <div class="description">获取用户推荐，基于地理位置和兴趣偏好推荐相关用户</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">limit</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>推荐数量限制，默认为10</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">type</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>推荐类型：nearby(附近)、popular(热门)、similar(相似)，默认为nearby</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "data": {
    "users": [
      {
        "id": "用户ID",
        "nickname": "昵称",
        "avatar": "头像URL",
        "bio": "个人简介",
        "location": "位置信息",
        "followersCount": "粉丝数量",
        "activitiesCount": "活动数量",
        "distance": "距离(公里，如果是附近推荐)",
        "recommendReason": "推荐原因",
        "isFollowing": "当前登录用户是否关注此用户",
        "isFriend": "当前登录用户是否与此用户是好友"
      }
    ],
    "type": "推荐类型"
  }
}
                    </div>
                </div>
            </div>
        </div>

        <div class="api-section">
            <h2>🎯 活动管理API</h2>
            
            <div class="api-item">
                <span class="method get">GET</span>
                <span class="endpoint">/api/activities</span>
                <div class="description">获取所有活动列表，支持按类型、状态、时间等条件筛选和分页</div>
                <div class="access public">🌐 公开访问</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">page</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>页码，默认为1</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">limit</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>每页数量，默认为10</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">type</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动类型筛选，如运动、聚餐、旅游等</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">status</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动状态筛选：upcoming(即将开始)、ongoing(进行中)、completed(已完成)、cancelled(已取消)</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">startDate</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>开始日期筛选，格式：YYYY-MM-DD</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">endDate</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>结束日期筛选，格式：YYYY-MM-DD</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">sortBy</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>排序字段：createdAt(创建时间)、startTime(开始时间)、participantsCount(参与人数)，默认为startTime</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">order</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>排序方向：asc(升序)、desc(降序)，默认为asc</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "data": {
    "activities": [
      {
        "id": "活动ID",
        "title": "活动标题",
        "description": "活动描述",
        "type": "活动类型",
        "status": "活动状态",
        "startTime": "开始时间",
        "endTime": "结束时间",
        "location": {
          "name": "地点名称",
          "address": "详细地址",
          "latitude": "纬度",
          "longitude": "经度"
        },
        "maxParticipants": "最大参与人数",
        "participantsCount": "当前参与人数",
        "price": "价格",
        "images": ["活动图片URL数组"],
        "creator": {
          "id": "创建者ID",
          "nickname": "创建者昵称",
          "avatar": "创建者头像"
        },
        "isLiked": "当前登录用户是否点赞",
        "isParticipating": "当前登录用户是否参与",
        "likesCount": "点赞数量",
        "commentsCount": "评论数量",
        "createdAt": "创建时间",
        "updatedAt": "更新时间"
      }
    ],
    "pagination": {
      "page": "当前页码",
      "limit": "每页数量",
      "total": "总活动数",
      "pages": "总页数"
    }
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method get">GET</span>
                <span class="endpoint">/api/activities/nearby</span>
                <div class="description">获取指定位置附近的活动，基于地理位置和距离筛选</div>
                <div class="access public">🌐 公开访问</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">latitude</span>
                        <span class="param-type">number</span>
                        <span class="param-required">[必填]</span>
                        <div>当前纬度</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">longitude</span>
                        <span class="param-type">number</span>
                        <span class="param-required">[必填]</span>
                        <div>当前经度</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">radius</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>搜索半径(公里)，默认为20</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">limit</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>返回数量限制，默认为20</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">type</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动类型筛选</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "data": {
    "activities": [
      {
        "id": "活动ID",
        "title": "活动标题",
        "description": "活动描述",
        "type": "活动类型",
        "status": "活动状态",
        "startTime": "开始时间",
        "endTime": "结束时间",
        "location": {
          "name": "地点名称",
          "address": "详细地址",
          "latitude": "纬度",
          "longitude": "经度"
        },
        "distance": "距离(公里)",
        "maxParticipants": "最大参与人数",
        "participantsCount": "当前参与人数",
        "price": "价格",
        "images": ["活动图片URL数组"],
        "creator": {
          "id": "创建者ID",
          "nickname": "创建者昵称",
          "avatar": "创建者头像"
        },
        "isLiked": "当前登录用户是否点赞",
        "isParticipating": "当前登录用户是否参与",
        "likesCount": "点赞数量",
        "commentsCount": "评论数量",
        "createdAt": "创建时间"
      }
    ],
    "count": "附近活动总数"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method get">GET</span>
                <span class="endpoint">/api/activities/:id</span>
                <div class="description">获取指定活动的详细信息，包括创建者、参与者、评论等</div>
                <div class="access public">🌐 公开访问</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动ID，作为URL路径参数</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "data": {
    "id": "活动ID",
    "title": "活动标题",
    "description": "活动描述",
    "type": "活动类型",
    "status": "活动状态",
    "startTime": "开始时间",
    "endTime": "结束时间",
    "location": {
      "name": "地点名称",
      "address": "详细地址",
      "latitude": "纬度",
      "longitude": "经度"
    },
    "maxParticipants": "最大参与人数",
    "participantsCount": "当前参与人数",
    "price": "价格",
    "images": ["活动图片URL数组"],
    "creator": {
      "id": "创建者ID",
      "nickname": "创建者昵称",
      "avatar": "创建者头像",
      "bio": "创建者简介"
    },
    "participants": [
      {
        "id": "参与者ID",
        "nickname": "参与者昵称",
        "avatar": "参与者头像",
        "joinTime": "加入时间",
        "status": "参与状态：approved(已批准)、pending(待审核)"
      }
    ],
    "isLiked": "当前登录用户是否点赞",
    "isParticipating": "当前登录用户是否参与",
    "participationStatus": "当前登录用户的参与状态",
    "likesCount": "点赞数量",
    "commentsCount": "评论数量",
    "recentComments": [
      {
        "id": "评论ID",
        "content": "评论内容",
        "user": {
          "id": "评论用户ID",
          "nickname": "评论用户昵称",
          "avatar": "评论用户头像"
        },
        "createdAt": "评论时间"
      }
    ],
    "createdAt": "创建时间",
    "updatedAt": "更新时间"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method post">POST</span>
                <span class="endpoint">/api/activities</span>
                <div class="description">创建新活动，包括活动标题、描述、时间、地点、参与人数限制等</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">title</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动标题，1-100字符</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">description</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动描述，1-1000字符</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">type</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动类型，如运动、聚餐、旅游等</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">startTime</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动开始时间，ISO 8601格式</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">endTime</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动结束时间，ISO 8601格式</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">location</span>
                        <span class="param-type">object</span>
                        <span class="param-required">[必填]</span>
                        <div>活动地点信息</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">location.name</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>地点名称</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">location.address</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>详细地址</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">location.latitude</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>纬度</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">location.longitude</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>经度</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">maxParticipants</span>
                        <span class="param-type">number</span>
                        <span class="param-required">[必填]</span>
                        <div>最大参与人数，最小为2</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">price</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动价格，默认为0</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">images</span>
                        <span class="param-type">array</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动图片URL数组，最多9张</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">approvalRequired</span>
                        <span class="param-type">boolean</span>
                        <span class="param-optional">[可选]</span>
                        <div>是否需要批准加入，默认为false</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">joinDeadline</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>加入截止时间，ISO 8601格式</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "活动创建成功",
  "data": {
    "id": "新创建的活动ID",
    "title": "活动标题",
    "description": "活动描述",
    "type": "活动类型",
    "status": "活动状态，默认为upcoming",
    "startTime": "开始时间",
    "endTime": "结束时间",
    "location": {
      "name": "地点名称",
      "address": "详细地址",
      "latitude": "纬度",
      "longitude": "经度"
    },
    "maxParticipants": "最大参与人数",
    "participantsCount": "当前参与人数(为1，创建者)",
    "price": "价格",
    "images": ["活动图片URL数组"],
    "creator": {
      "id": "创建者ID",
      "nickname": "创建者昵称",
      "avatar": "创建者头像"
    },
    "approvalRequired": "是否需要批准加入",
    "joinDeadline": "加入截止时间",
    "createdAt": "创建时间",
    "updatedAt": "更新时间"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method put">PUT</span>
                <span class="endpoint">/api/activities/:id</span>
                <div class="description">更新活动信息，只有活动创建者可以修改活动详情</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动ID，作为URL路径参数</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">title</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动标题，1-100字符</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">description</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动描述，1-1000字符</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">type</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动类型</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">startTime</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动开始时间，ISO 8601格式</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">endTime</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动结束时间，ISO 8601格式</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">location</span>
                        <span class="param-type">object</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动地点信息</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">maxParticipants</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>最大参与人数，最小为2</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">price</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动价格</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">images</span>
                        <span class="param-type">array</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动图片URL数组，最多9张</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">approvalRequired</span>
                        <span class="param-type">boolean</span>
                        <span class="param-optional">[可选]</span>
                        <div>是否需要批准加入</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">joinDeadline</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>加入截止时间，ISO 8601格式</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "活动更新成功",
  "data": {
    "id": "活动ID",
    "title": "更新后的活动标题",
    "description": "更新后的活动描述",
    "type": "更新后的活动类型",
    "status": "活动状态",
    "startTime": "更新后的开始时间",
    "endTime": "更新后的结束时间",
    "location": {
      "name": "更新后的地点名称",
      "address": "更新后的详细地址",
      "latitude": "更新后的纬度",
      "longitude": "更新后的经度"
    },
    "maxParticipants": "更新后的最大参与人数",
    "participantsCount": "当前参与人数",
    "price": "更新后的价格",
    "images": ["更新后的活动图片URL数组"],
    "creator": {
      "id": "创建者ID",
      "nickname": "创建者昵称",
      "avatar": "创建者头像"
    },
    "approvalRequired": "更新后的批准加入设置",
    "joinDeadline": "更新后的加入截止时间",
    "updatedAt": "更新时间"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method delete">DELETE</span>
                <span class="endpoint">/api/activities/:id</span>
                <div class="description">删除活动，只有活动创建者可以删除，且活动未开始或未完成</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动ID，作为URL路径参数</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "活动删除成功"
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method post">POST</span>
                <span class="endpoint">/api/activities/:id/join</span>
                <div class="description">加入活动，用户可以报名参加指定活动</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动ID，作为URL路径参数</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">contactInfo</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>联系方式，如手机号或微信号</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">joinNickname</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>活动中的昵称，如不提供则使用用户昵称</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">message</span>
                        <span class="param-type">string</span>
                        <span class="param-optional">[可选]</span>
                        <div>给活动创建者的留言</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "成功加入活动",
  "data": {
    "activityId": "活动ID",
    "userId": "用户ID",
    "status": "参与状态：approved(已批准)或pending(待审核)",
    "joinTime": "加入时间",
    "contactInfo": "联系方式",
    "joinNickname": "活动中的昵称"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method post">POST</span>
                <span class="endpoint">/api/activities/:id/leave</span>
                <div class="description">离开活动，用户可以取消参加已报名的活动</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动ID，作为URL路径参数</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "已退出活动"
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method post">POST</span>
                <span class="endpoint">/api/activities/:id/like</span>
                <div class="description">点赞活动，用户可以表达对活动的喜爱</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动ID，作为URL路径参数</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "点赞成功",
  "data": {
    "activityId": "活动ID",
    "userId": "用户ID",
    "liked": true,
    "likesCount": "当前总点赞数"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method delete">DELETE</span>
                <span class="endpoint">/api/activities/:id/like</span>
                <div class="description">取消点赞活动，用户可以撤销对活动的点赞</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动ID，作为URL路径参数</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "取消点赞成功",
  "data": {
    "activityId": "活动ID",
    "userId": "用户ID",
    "liked": false,
    "likesCount": "当前总点赞数"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method post">POST</span>
                <span class="endpoint">/api/activities/:id/comments</span>
                <div class="description">添加活动评论，用户可以对活动发表评论和看法</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动ID，作为URL路径参数</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">content</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>评论内容，1-500字符</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">images</span>
                        <span class="param-type">array</span>
                        <span class="param-optional">[可选]</span>
                        <div>评论图片URL数组，最多3张</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "评论添加成功",
  "data": {
    "id": "评论ID",
    "content": "评论内容",
    "images": ["评论图片URL数组"],
    "user": {
      "id": "评论用户ID",
      "nickname": "评论用户昵称",
      "avatar": "评论用户头像"
    },
    "activityId": "活动ID",
    "createdAt": "评论时间",
    "updatedAt": "更新时间"
  }
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method delete">DELETE</span>
                <span class="endpoint">/api/activities/:id/comments/:commentId</span>
                <div class="description">删除活动评论，评论作者或活动创建者可以删除评论</div>
                <div class="access private">🔒 需要认证</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">id</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>活动ID，作为URL路径参数</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">commentId</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>评论ID，作为URL路径参数</div>
                    </div>
                </div>
                
                <div class="response">
                    <h4>返回格式</h4>
                    <div class="code-block">
{
  "success": true,
  "message": "评论删除成功"
}
                    </div>
                </div>
            </div>

            <div class="api-item">
                <span class="method get">GET</span>
                <span class="endpoint">/api/activities/user/:userId</span>
                <div class="description">获取指定用户创建的活动列表，支持分页显示</div>
                <div class="access public">🌐 公开访问</div>
                
                <div class="params">
                    <h4>请求参数</h4>
                    <div class="param-item">
                        <span class="param-name">userId</span>
                        <span class="param-type">string</span>
                        <span class="param-required">[必填]</span>
                        <div>用户ID，作为URL路径参数</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">page</span>
                        <span class="param-type">number</span>
                        <span class="param-optional">[可选]</span>
                        <div>页码，默认为1</div>
                    </div>
                    <div class="param-item">
                        <span class="param-name">limit</span>
                        <span class="param-type">number